package com.jic.order.task;

import com.jic.order.service.OrderLogisticsService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 订单定时任务类
 *
 * @author pxg
 * @version v1
 * @date 2020/11/27 15:09
 */
@Component
@Slf4j
public class OrderServiceTask {

    @Autowired
    private OrderLogisticsService orderLogisticsService;
    /**
     * 更新订单物流信息
     * 每10分钟执行一次
     */
    @Scheduled(fixedDelay = 1000 * 60 * 1000)
    @Async("asyncServiceExecutor")
    public void liveBannerInfoTimerTask() {
        orderLogisticsService.queryLogisticsInfo();
    }
}
